<?php
//require_once(dirname(__FILE__)."/../src/search_mod_ajax_post.php");
require_once(dirname(__FILE__)."/../src/search_mod_fetch_url.php");
require_once(dirname(__FILE__)."/../src/search_mod_search_party.php");
require_once(dirname(__FILE__)."/../src/search_mod_update_index.php");
require_once(dirname(__FILE__)."/../src/get_partyArray_by_landmark.php");
require_once(dirname(__FILE__)."/../src/testimg.php");
require_once(dirname(__FILE__)."/../src/search_mod_site_search.php");
require_once(dirname(__FILE__)."/../src/daogou_search_mod_site_search.php");
if($_SERVER['REQUEST_METHOD'] == "POST")
{
	switch ($_POST['act'])
	{

		case 'post_party_info': //please change the case value to your service name
			//To do;
		    echo "<h1>POST  post_party_info成功啦</h1>"; //this is an example
		    break;
		case 'tttt':           //please change the case value to your service name
			//To do;
    		echo "<h1>POST  tttt成功啦</h1>"; //this is an example
		    break;
		default:
			echo  'POST_FALSE';
			break;
	}


}
else if($_SERVER['REQUEST_METHOD'] == "GET")
{
    switch ($_GET['act'])
	{
		case 'testimg':
			echo testimg();
		    break;
		case 'ajaxtest':
			echo $_GET['name'].$_GET['password'].'search haha';
		    break;

		case 'fetch_url'://这个serviceUrl是用于到serviceUrl表中取出一条记录并返回。
			//To do;
		    echo fetch_url($_GET['serviceUrlId']);
		    break;


		case 'click'://这个serviceUrl，是用于响应主页的点击事件。可能点击的是分类、行业、场所或过滤条件。
		    echo $_GET;
		    break;

		case 'updateindex'://这个serviceUrl，是用于给sit的动态主页所需要的数据。
			echo update_index( );
			break;
	    case 'test':
			echo $_GET['arg'];
		    break;
        case 'get_party_by_landmark':
			echo GetPartyArrayByLandmark($_GET);		
		    break;
		case 'site_search':
			echo SiteSearch($_GET);
		    break;
        case 'searchbox':
			echo daogou_search($_GET);
            break;
		default:
			echo  'GET_FALSE';
			break;
	}
}
else
{
	echo 'FALSE';
}



?>